<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>数组排重</title>
</head>
<body>
    
    <script>
     function paichong(array){
         for(i = array.length - 1;i >= 0; i--){

             for(var j = i -1;j >=0; j--){
                 if(array[i]  ==array[j]){
                     //删除重复的元素
                     array.splice(j,1);
                     break;
                    //  i--;
                 }
             }
         }
return array;
     }
var arr = [1,2,3,4,5,6,7,8,9,0,12,4,5,3,6]
console.log(paichong(arr));



    </script>
</body>
</html>